package com.gao.feign;

import commomresult.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import pojo.Payment;

/**
 * @author gaofeng
 * @date 2022年08月06日 18:52
 *
 * @FeignClient 声明需要调用的微服务名称
 *  name:服务提供者的名称
 */
@FeignClient(name = "mcroservice-payment")
public interface ProductClientFeign {

    /**
     * 配置需要调用的微服务接口
     * @param id 主键
     * @return CommonResult<Payment>
     */
    @RequestMapping(value = "/pay/queryById/{id}", method = RequestMethod.GET)
    public CommonResult<Payment> findProductById(@PathVariable Integer id) ;
}
